<?php

namespace app\api\model;

use app\api\service\Api;
use think\Db;
use think\Request;

class AuthGroupAccessModel extends Api
{
    protected static $instance;

    public function __construct(Request $request = null)
    {
        parent::__construct($request);
    }

    public static function getInstance()
    {
        if (is_null(self::$instance))
        {
            self::$instance = new static();
        }
        return self::$instance;
    }

    /**
     * 获取一列数据
     */
    public function column($uid)
    {
        return Db::name('auth_group_access')->where([
            'uid' => ['eq', $uid]
        ])->column('group_id');
    }
}